<template>
	<view class="layout">
		<demo-child ref="child"></demo-child>
		<view>----</view>
		<button @click="onClick">点击修改子组件的值</button>
		<navigator url="/pages/demo6/demo6?name=王五&age=20">跳转到demo6</navigator>
	</view>
</template>

<script setup>
import { onMounted, ref } from 'vue';

const child = ref(null)

onMounted(()=>{
	console.log(child.value)
})

function onClick(){
	child.value.updateCount()
}
</script>

<style lang='scss' scoped>

</style>
